home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 2
/
Aminet AMIGA CDROM (1994)(Walnut Creek)[Feb 1994][W.O. 44790-1].iso
/
Aminet
/
gfx
/
misc
/
graphtal1293.lha
/
Graphtal.Amiga
/
BaseWindow.h
< prev
next >
Wrap
C/C++ Source or Header
|
1992-11-17
|
2KB
|
75 lines
/*
* BaseWindow.h - class definition of abstract base class
* for window support.
*
* Copyright (C) 1992, Christoph Streit (streit@iam.unibe.ch)
* University of Berne, Switzerland
* All rights reserved.
*
* This software may be freely copied, modified, and redistributed
* provided that this copyright notice is preserved on all copies.
*
* You may not distribute this software, in whole or in part, as part of
* any commercial product without the express consent of the authors.
*
* There is no warranty or other guarantee of fitness of this software
* for any purpose. It is provided solely "as is".
*
*/
#ifndef BaseWindow_H
# define BaseWindow_H
#include "Vector.h"
#include "ViewTransform.h"
#include "Polygon.h"
//___________________________________________________________ BaseWindow
class LineList;
class BaseWindow
{
public:
BaseWindow();
virtual ~BaseWindow();
virtual void open(int resX, int resY, const rcString& windowName);
virtual void close();
virtual void clear();
virtual char waitForKey()=0;
virtual void writeText(const rcString&, int, int)=0;
virtual void line(const Vector&, const Vector&); // draw line
virtual void polygon(Polygon*); // draw polygon
virtual void flush(); // flush buffer
virtual void disableBuffering();
virtual void enableBuffering();
virtual void setView(const Vector& eye, const Vector& lookat,
const Vector& up, real fov);
virtual void setView(const BoundingBox& bbox,
const Vector& up, real fov);
protected:
ViewTransform* view; // view to apply
int resX, resY; // window resolution
rcString name; // name of the window
int windowIsOpen; // is the window already open?
protected:
// drawLine is used by member functions line and poly to
// actually draw a line on the screen.
virtual void drawLine(int, int, int, int)=0;
private:
int buffering; // buffering enabled?
LineList* lines; // buffered lines
PolygonList* polys; // buffered polys
private:
void clearBuffer();
};
#endif // BaseWindow_H